// 添加和修改权限规则的window视图

Ext.define("app.view.auth.RuleOperation",{
	extend: 'Ext.window.Window',
	alias: 'widget.ruleoperation',
	bodyPadding: 20,
	width: 500,	
	border: false,
	modal: true,

	items: [{
		xtype: 'form',
		defaultType: 'textfield',
		defaults: {
			labelWidth: 80,
			labelAlign: 'right',
			width: 420
		},
		items: [{
			fieldLabel: '编号',
			name: 'id',
			editable: false
		}, {
			fieldLabel: '规则名称',
			name: 'name',
			emptyText: '英文',
			allowBlank: false
		}, {
			fieldLabel: '规则标题',
			name: 'title',
			emptyText: '中文描述',
			allowBlank: false
		}, {
			fieldLabel: '规则类型',
			name: 'type',
			emptyText: '默认值请填入 1',
		}, {
			xtype: 'radiogroup',
	        fieldLabel: '是否启用',
	        items: [
	            { boxLabel: '启用', name: 'status', inputValue: 1, checked: true},
	            { boxLabel: '禁用', name: 'status', inputValue: 0},
	        ]
		}, {
			fieldLabel: '规则条件',
			name: 'condition'
		}]
	}, {
		xtype: 'button',
		style: 'margin: 10px auto 0 210px',
		text: '确定',
		action: 'ruleFormSubmit'
	}],

	initComponent: function(){//初始化方法
		this.callParent(arguments);		
	}
});